package com.dcrzl.gazgmh.common.entity.sys;

import com.baomidou.mybatisplus.annotation.*;
import com.dcrzl.gazgmh.common.utils.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;



/**
 * 菜单管理
 *
 * @author dcrzl
 * @email 1728795786@qq.com
 * @date 2023-04-24 22:02:14
 */
@Data
@TableName("t_sys_menu")
@Accessors(chain = true)
public class SysMenu extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 父菜单ID，一级菜单为0
     */
    @TableField(value = "parent_id")
    private Long parentId;
    /**
     * 菜单名称
     */
    @TableField(value = "name")
    private String name;
    /**
     * 菜单URL
     */
    @TableField(value = "url")
    private String url;
    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    @TableField(value = "perms")
    private String perms;
    /**
     * 类型   0：目录   1：菜单   2：按钮
     */
    @TableField(value = "type")
    private Integer type;
    /**
     * 菜单图标
     */
    @TableField(value = "icon")
    private String icon;
    /**
     * 排序
     */
    @TableField(value = "order_num")
    private Integer orderNum;
    /**
     *
     */
    @TableField(value = "status", fill = FieldFill.INSERT)
    private Integer status;
    /**
     *
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     *
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private String parentName;

    @TableField(exist = false)
    private List<SysMenu> list;

    @TableField(exist = false)
    private Boolean open;

}
